<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<div id="app">
    <!-- vue在解析k-v的时候，通常把k自动当做字符串，但是v的话如果不加“ ”，默认当成data里的属性 -->
    <h2 :style={color:'red',fontSize:size+'px'}>{{ msg }}</h2>
    <br>
    <button @click="bigger">变大</button>
</div>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            msg: "hello,world",
            size: 30
        },
        methods:{
            bigger(){
                this.size+=10
            }
        }
    })
</script>
</body>
</html>